package com.zdy.today.fragment;

import android.app.Activity;
import android.app.Fragment;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.zdy.today.R;
import com.zdy.today.adapter.RecyclerWodeListAdapter;

/**
 * 首页侧边栏页面
 */
public class LeftMenuFragment extends Fragment {
    private RecyclerWodeListAdapter recyclerWodeListAdapter;
    RecyclerView list;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
        Activity activity = getActivity();
        View inflate = View.inflate(activity, R.layout.list, null);
        RecyclerView list = (RecyclerView) inflate.findViewById(R.id.tc_lv);
        list.setLayoutManager(new LinearLayoutManager(activity));
        recyclerWodeListAdapter = new RecyclerWodeListAdapter(activity);
        list.setAdapter(recyclerWodeListAdapter);
        return inflate;
    }

}
